<?php
	function __autoload($class_name)
	{
		include_once('../classes/'.strtolower($class_name).'.php');
	}
    $Loi = false;
    
    $MaQuyCach = $_POST['MaQuyCach'];
	$TenQuyCach = $_POST['TenQuyCach'];
		    
    $quycach = new quycachbs();
    $quycach->MaQuyCach = $MaQuyCach;
    $quycach->TenQuyCach = $TenQuyCach;
    $isset = $quycach->issetTypes();
    
    if($isset[0]['SoDong'] != 1)
        $Loi = true;
    
    if($Loi == false)
    {
        $quycach->update();
        echo "yes";
    }
    else
    {
        echo "no";
    }
?>